<?php
/* 
 * ********* CVS HEADER ********* 
 * 
 * $RCSfile: admenvnew.php,v $ 
 * $Date: 2006/03/04 15:24:35 $ 
 * $Revision: 1.3 $ 
 * 
 * ********* CVS HEADER ********* 
 */
global $rportalconstants;
$L_base_env = get_env_path();
$L_modules = '';
$L_accueil = $rportalconstants->get_value("RPORTAL","environnement.home.default");

require_once($L_modules . get_path_module("fonctions.environnement"));

if($nom!="")
{
    if( (strpos($nom,'..') === false) && 
    	(strpos($nom,'/') === false) ) {
    } else {
    	header('Location: ?op=');
    	exit;
    }
    
	$L_newId = creer_environnement($nom,$description,$accueil);
	header("Location: ?op=admenvmod&argid=".$L_newId);
	exit;
}
require_once(get_path("module")."TPLN/TPLN.php");
$TPLN = new TPLN;
$TPLN->Open($op_basepath.get_path("tpl")."admenvnew.html");
$TPLN->Parse("accueil",$L_accueil);
$TPLN->IncludeFile("header",$L_base_env.$session['environnement']."/header.php");
$TPLN->IncludeFile("footer",$L_base_env.$session['environnement']."/footer.php");

require_once(get_path_module("admin")); 
$pc = new panneau_controle(); 
$pc->calculRubriqueParFonction($op); 
$TPLN->Parse("panneau_controle",$pc->retourneEntete());

$TPLN->Write();
?>